n1 = float(input("请输入一个数："))
n2 = float(input("请输入一个数："))
operation = input("请输入运算符：")

res = 0.0

if operation == '+':
    res = n1 + n2
elif operation == '-':
    res = n1 - n2
elif operation == '*':
    res = n1 * n2
elif operation == '/':
    res = n1 / n2
else:
    print("输入的运算符不对")

print(f"n1 {operation} n2 = {res}")

